package com.crane.oss.enums;

/**
 * 机构类型
 */
public enum PartyTypeEnum {
    /**
     * 用户类型
     */
    ADMIN(0, "系统机构"),

    CITY(1, "市机构"),

    AREA(2, "区县机构"),

    SCHOOL(3, "校区机构");

    private Integer type;

    private String remark;

    private PartyTypeEnum(Integer type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public static String getPartyTypeName(Integer type) {
        String result = "";
        for (PartyTypeEnum typeEnum : PartyTypeEnum.values()) {
            if (null != type && typeEnum.getType() == type) {
                return typeEnum.getRemark();
            }
        }
        return result;
    }
}
